<!--
 * @Author: yan_hai_dong 891236760@qq.com
 * @Date: 2022-10-24 15:25:05
 * @LastEditors: yan_hai_dong 891236760@qq.com
 * @LastEditTime: 2022-10-24 16:45:00
 * @FilePath: \app\src\views\canvas\circle\pie\index.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <canvas width="400" height="400"></canvas>
</template>

<script>
import Pie from "./js/pie.js";
export default {
  props: {
    hollow: {
      default: 0,
    },
  },
  mounted() {
    let data = [
      {
        text: "项目一占比",
        rate: 70,
        color: "#ff8800",
      },
      {
        text: "项目二占比",
        rate: 20,
        color: "green",
      },
    //   {
    //     text: "项目3占比",
    //     rate: 30,
    //     color: "red",
    //   },
      {
        text: "项目3占比",
        rate: 33,
        color: "#656500",
      },
    ];
    new Pie(this.$el, this.hollow).init(data);
  },
};
</script>

<style lang="less" scoped>
</style>